/*
版权@hehung所有，转载请申明
email：1398660197@qq.com
*/
#ifndef __APP_DISPLAY_H__
#define __APP_DISPLAY_H__

#include <stdint.h>
#include "app_alarm.h"
#include "app_key.h"


/* 闹钟个数上限 */
#define DISP_SETTING_ALARM_MAX                     (ALARM_NUM_MAX)
/* 闹钟时间调整时的时间阈值 */
#define DISP_SR_DETAIL_AD_THD                      (uint16_t)(200U/KEY_TASK_CYCLE_MS)    /* 200ms */

typedef enum
{
	DISP_INIT = 0,
	DISP_TIME,
	DISP_MENU,
	DISP_SETTING_MENU,
	DISP_SETTING_DATE,
	DISP_SETTING_ALARM,
	DISP_SETTING_ALARM_DETAIL,
	DISP_SETTING_CITY,
	DISP_WIFI,    /* 配网 */
	DISP_WEATHER,
	DISP_SETTING_DATE_ERROR
} e_DispFlg;

typedef enum
{
	DISP_SETTING_MENU_ALARM = 0x00,
	DISP_SETTING_MENU_VOLU,    /* 音量 */
	DISP_SETTING_MENU_VS,      /* 音效 */
	DISP_SETTING_MENU_VTR,     /* 报时 */
	DISP_SETTING_MENU_NTP,
	DISP_SETTING_MENU_DATE,
	DISP_SETTING_MENU_CITY,    /* 设置城市 */
	DISP_SETTING_MENU_EXIT
} e_DispSetMenu;

typedef enum
{
	DISP_MENU_SETTING = 0x01,
	DISP_MENU_WIFI_CONFIG,
	DISP_MENU_WEATHER,
	DISP_MENU_EXIT
} e_DispMenu;

typedef enum
{
	DISP_DATE_SETTING_HOUR = 0x01,
	DISP_DATE_SETTING_MIN,
	DISP_DATE_SETTING_SEC,
	DISP_DATE_SETTING_YEAR,
	DISP_DATE_SETTING_MON,
	DISP_DATE_SETTING_MDAY,
	DISP_DATE_SETTING_EXIT
} e_DispDateSetting;

typedef enum
{
	DISP_SETTING_ALARM_PREV = 0x01,
	DISP_SETTING_ALARM_ENTER,
	DISP_SETTING_ALARM_NEXT,
	DISP_SETTING_ALARM_EXIT
} e_DispAlarmSetting;

typedef enum
{
	DISP_SR_DETAIL_PREV = 0x01,
	DISP_SR_DETAIL_NEXT,
	DISP_SR_DETAIL_HOUR,
	DISP_SR_DETAIL_MIN,
	DISP_SR_DETAIL_EN,
	DISP_SR_DETAIL_MON,
	DISP_SR_DETAIL_TUES,
	DISP_SR_DETAIL_WED,
	DISP_SR_DETAIL_THUR,
	DISP_SR_DETAIL_FIR,
	DISP_SR_DETAIL_SAT,
	DISP_SR_DETAIL_SUN,
	DISP_SR_DETAIL_EXIT
} e_DispAlarmDetailSetting;

typedef enum
{
	DISP_CITY_CODE_1 = 0x01,
	DISP_CITY_CODE_2,
	DISP_CITY_CODE_3,
	DISP_CITY_CODE_4,
	DISP_CITY_CODE_5,
	DISP_CITY_CODE_6,
	DISP_CITY_CODE_7,
	DISP_CITY_CODE_8,
	DISP_CITY_CODE_9,
	DISP_CITY_EXIT
} e_DispCitySetting;



extern void Disp_Init(void);
extern void Disp_Key1ShortPressJudge(void);
extern void Disp_Key2ShortPressJudge(void);
extern void Disp_Key1LongPressJudge(void);
extern void Disp_Key2LongPressJudge(void);
extern void Disp_Key1Holding(void);
extern void Disp_Key2Holding(void);
extern void Disp_SetSettingCityCode(uint32_t citycode);
extern void Disp_SetSettingVolmue(int value);
extern void Disp_SetSettingSoundTime(int value);
extern void Disp_setSettingSoundEffect(int value);
extern void Disp_setSettingNtpEn(int value);

#endif

